/**
 * Created by Administrator on 2017/3/16.
 */
//处理数据业务的

var db = require("./db.js");



exports.gamelogin = function(req,res){
    var text1 = req.query.user;
    db.open_db();
    db.db_gamelogin(text1,res);
    db.end_db();
}
exports.gamenum = function(req,res){
    var user = req.body.user,
        num = req.body.num;
    console.log(user);
    console.log("da");
    console.log(num);
    db.open_db();
    db.db_gamenum(user,num,res);
    db.end_db();
}
exports.gamelist = function(req,res){
    db.open_db();
    db.db_gamelist(req,res);
    db.end_db();
}











